package components.asteroids;


import images.Images;

import java.util.ArrayList;
import java.util.List;


public class AsteroidLvl3 extends Asteroid {

	
	public AsteroidLvl3(double x, double y) {
		super(20, 1, 1, 50, 300,  6, x, y);
		this.setAppearance(Images.images.getImage("asteroid3"));
		
	}

	
	public List<Asteroid> getFragments(){
		List<Asteroid> frags = new ArrayList<Asteroid>();
		AsteroidLvl2 f1, f2, f3;
		f1= new AsteroidLvl2(this.getX(), this.getY());
		f1.setDirVectX(1 + this.getDirVectX());
		f1.setDirVectY(-1 - this.getDirVectY());
		
		f1.setSpeed(this.getFragmentsSpeed());
		
		f2= new AsteroidLvl2(this.getX(), this.getY());
		f2.setDirVectX(- 1 - this.getDirVectX());
		f2.setDirVectY(1 + this.getDirVectY());
		
		f2.setSpeed(this.getFragmentsSpeed());
		
		f3= new AsteroidLvl2(this.getX(), this.getY());
		f3.setDirVectX(this.getDirVectX());
		f3.setDirVectY(this.getDirVectY()*2);
		
		f3.setSpeed(this.getFragmentsSpeed());
		
		frags.add(f1); frags.add(f2); frags.add(f3);
		
		return frags;
	}
}
